package com.ck.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 房间历史记录表(MRoomRecord)表实体类
 *
 * @author ck
 * @since 2020-11-06 15:44:01
 */
@TableName(value = "m_room_record")
@Data
public class MRoomRecord extends Model<MRoomRecord> {
    /**
     * 记录id
     **/
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 房间id
     **/
    private Integer roomId;
    /**
     * 用户id
     **/
    private Integer userId;
    /**
     * 记录数
     **/
    private Integer recordNum;
    /**
     * 胡数
     **/
    @NotNull(message = "胡数不能为空")
    private Integer hus;
    /**
     * 红黑胡类型, 普通-1, 其他对应m_red_black表type字段
     **/
    private Integer redBlackType;
    /**
     * 总倍数
     **/
    private Integer times;
    /**
     * 输赢, 1赢 0输
     **/
    private Integer result;
    /**
     * 当前总金币
     **/
    private BigDecimal curAllCoin;
    /**
     * 当前输赢金币计数
     **/
    private BigDecimal curCoin;
    /**
     * 创建时间
     **/
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;


}
